

public class TestSimulation 
{
	/**
	 * Run dependency-based test
	 * @param c component under test oracle
	 * @return true iff test has FAILED
	 */
	public static boolean RunTest(Component c)
	{
		while(c != null)
		{
			if(Math.random() < c.getHealth()) //component is at fault
				return true; //test fails
			c = c.getPredecessor();
		}
		return false;
	}

}
